import SysContextmenu from './contextmenu/index'

import simpleDialog from './dialog/simple-dialog'
import editorLayout from './editLayout/editor-layout'
import sysCtrl from './page/sys-ctrl'
import fileUpload from './file/file-upload'
import fileViewSingle from './file/file-view-single'
import fileView from './file/file-view'
import myTable from './page/my-table'
import formDetail from './detail/form-detail'
import sysEllipsis from './detail/sys-ellipsis'
import sysTitle from './page/sys-title'
import sysDict from './dict/sys-dict'
import tagStatus from './dict/tag-status'
import sysNum from './num/sys-num'
import sysLayout from './page/sys-layout'
import sysSelect from './sys-select'
import sysPage from './page/sys-page'
import sysButton from './page/sys-button'
import simpleChart from './echarts/simple-chart'
import hsTable from './handsometable/hs-table'
import hsSelect from './handsometable/hs-select'

const components = {
  simpleDialog,
  editorLayout,
  sysCtrl,
  fileUpload,
  fileViewSingle,
  fileView,
  myTable,
  formDetail,
  sysEllipsis,
  sysTitle,
  sysDict,
  tagStatus,
  sysNum,
  sysLayout,
  sysSelect,
  sysPage,
  sysButton,
  simpleChart,
  hsTable,
  hsSelect,
  SysContextmenu
}

const install = (Vue) => {
  Object.keys(components).forEach(key => {
    Vue.component(key, components[key])
  })
}

export default install
